function TablePaymentProblem(container, item, options) {
  this._container = container;
  this._item = item;
  this._options = options;
  
  this._user = (options && options.user) ? options.user : null;
  this._createElements();
};

TablePaymentProblem.prototype._createElements = function() {
  var gui, table, _self = this, unique = MiscUtils.unique();
    table = document.createElement('table');
    table.style.width = '900px';
    table.style.height = '23px';
    table.cellPadding = 0;
    table.cellSpacing = 0;
    table.id = unique + '_main_table';
    this._container.appendChild(table);
    
    tr = table.insertRow(-1);
    td = tr.insertCell(-1);
    td.style.width = '20px';
    td.style.height = '23px';
    td.style.backgroundColor = '#7a5052';
    td.style.borderRight = 'solid 1px #fff';
    var check = DOMUtils.createInput(null, null, 'checkbox', '', null);
    check.id = unique + '_checkAll_checkbox';
    td.appendChild(check);
    
    td = tr.insertCell(-1);
    td.style.width = '70px';
    td.style.fontWeight = 'bold';
    td.style.textAlign = 'center';
    td.style.fontSize = '10pt';
    td.style.color = 'white';
    td.style.backgroundColor = '#7a5052';
    td.style.borderRight = 'solid 1px #fff';
    td.appendChild(document.createTextNode('Status'));
    
    td = tr.insertCell(-1);
    td.style.borderRight = 'solid 1px #fff';
    td.style.width = '110px';
    td.style.textAlign = 'left';
    td.style.paddingLeft = '15px';
    td.style.height = '23px';
    td.style.backgroundColor = '#7a5052';
    td.style.fontWeight = 'bold';
    td.style.fontSize = '10pt';
    td.style.color = 'white';
    td.appendChild(document.createTextNode('Customer'));
    
    td = tr.insertCell(-1);
    td.style.borderRight = 'solid 1px #fff';
    td.style.width = '77px';
    td.style.textAlign = 'left';
    td.style.paddingLeft = '15px';
    td.style.height = '23px';
    td.style.backgroundColor = '#7a5052';
    td.style.fontWeight = 'bold';
    td.style.fontSize = '10pt';
    td.style.color = 'white';
    td.appendChild(document.createTextNode('C / D'));
    
    td = tr.insertCell(-1);
    td.style.borderRight = 'solid 1px #fff';
    td.style.width = '77px';
    td.style.textAlign = 'left';
    td.style.paddingLeft = '15px';
    td.style.height = '23px';
    td.style.backgroundColor = '#7a5052';
    td.style.fontWeight = 'bold';
    td.style.fontSize = '10pt';
    td.style.color = 'white';
    td.appendChild(document.createTextNode('W / D'));
    
    td = tr.insertCell(-1);
    td.style.borderRight = 'solid 1px #fff';
    td.style.width = '72px';
    td.style.textAlign = 'left';
    td.style.paddingLeft = '15px';
    td.style.height = '23px';
    td.style.backgroundColor = '#7a5052';
    td.style.fontWeight = 'bold';
    td.style.fontSize = '10pt';
    td.style.color = 'white';
    td.appendChild(document.createTextNode('Price'));
    
    td = tr.insertCell(-1);
    td.style.borderRight = 'solid 1px #fff';
    td.style.width = '72px';
    td.style.textAlign = 'left';
    td.style.paddingLeft = '15px';
    td.style.height = '23px';
    td.style.backgroundColor = '#7a5052';
    td.style.fontWeight = 'bold';
    td.style.fontSize = '10pt';
    td.style.color = 'white';
    td.appendChild(document.createTextNode('Received'));
    
    td = tr.insertCell(-1);
    td.style.borderRight = 'solid 1px #fff';
    td.style.width = '53px';
    td.style.textAlign = 'center';
    td.style.height = '23px';
    td.style.backgroundColor = '#7a5052';
    td.style.fontWeight = 'bold';
    td.style.fontSize = '10pt';
    td.style.color = 'white';
    td.appendChild(document.createTextNode('R / P'));
    
    td = tr.insertCell(-1);
    td.style.width = '260px';
    td.style.textAlign = 'left';
    td.style.paddingLeft = '15px';
    td.style.height = '23px';
    td.style.backgroundColor = '#7a5052';
    td.style.fontWeight = 'bold';
    td.style.fontSize = '10pt';
    td.style.color = 'white';
    td.appendChild(document.createTextNode('Note'));
    
  gui = GuiTablePaymentProblem.instance(unique);
  new HandleTablePaymentProblem(gui, this._item, this._options);
};
  